<div class="detail">
  <!-- 基本信息 -->
  <div class="clearfix credit-detail font-s">
    <h4 class="font-s font-green">基本信息</h4>
    <div class="font-s">
      <p>
        <span>企业名称：</span>
        <span ng-bind="loanDetail.company_name || '未填写'"></span>
      </p>
      <p>
        <span>证件类型：</span>
        <span ng-bind="loanDetail.id_type | idType"></span>
      </p>
      <p>
        <span>证件号码：</span>
        <span ng-bind="loanDetail.id_no || '未填写'"></span>
      </p>
      <p>
        <span>手机号码：</span>
        <span ng-bind="loanDetail.user_phone || '未填写'"></span>
      </p>
    </div>
  </div>
  <!--分割线-->
  <div class="line"></div>
  <!-- 工作单位信息 -->
  <div class="clearfix bgc-white credit-detail font-s">
    <h4 class="font-s font-green">贷款信息</h4>
    <div class="clearfix">
      <div class="fl font-s">
        <p>
          <span>贷款类型：</span>
          <span ng-bind="loanDetail.lnci_type | lnci_type"></span>
        </p>
        <p ng-show="loanDetail.lnci_type == 1">
          <span>订单平台：</span>
          <span ng-bind="loanDetail.ptnum | ptnum"></span>
        </p>
        <p>
          <span>贷款金额：</span>
          <span ng-bind="loanDetail.applyAmount + '元' || '未填写'"></span>
        </p>
        <p ng-show="loanDetail.lnci_type != 1">
          <span>用途说明：</span>
          <span ng-bind="loanDetail.applicationDescription || '未填写'"></span>
        </p>
        <p>
          <span>贷款期限：</span>
          <span ng-bind="loanDetail.loan_term + '个月' || '未填写'"></span>
        </p>
        <p>
          <span>贷款机构：</span>
          <span ng-bind="loanDetail.institution_name || '未填写'"></span>
        </p>
        <p>
          <span>借据编号：</span>
          <span ng-bind="loanDetail.loan_appno || '未填写'"></span>
        </p>
      </div>
      <div class="fl font-s secd-li">
        <p ng-show="loanDetail.lnci_type == 1">
          <span>订单编号：</span>
          <span ng-bind="loanDetail.order_id || '未填写'"></span>
        </p>
        <!--<p ng-show="loanDetail.lnci_type == 2">-->
          <!--<span>用途说明：</span>-->
          <!--<span ng-bind="loanDetail.applicationDescription || '未填写'"></span>-->
        <!--</p>-->
        <p ng-show="loanDetail.lnci_type == 1">
          <span>订单金额：</span>
          <span ng-bind="loanDetail.order_amount || '未填写'"></span>
        </p>
        <p>
          <span>贷款日期：</span>
          <span ng-bind="loanDetail.start_date || loanDetail.loay_apply_time || '未填写'"></span>
        </p>
        <p>
          <span>到期日期：</span>
          <span ng-bind="loanDetail.sdate || '未填写'"></span>
        </p>
        <p>
          <span>执行利率：</span>
          <span ng-bind="loanDetail.loan_rate || '未填写'"></span>
        </p>
        <p>
          <span>不动产抵押：</span>
          <span ng-bind="loanDetail.loan_mortgage | loan_mortgage"></span>
        </p>
      </div>
    </div>
    <div class="enclosure" ng-show="loanDetail.loan_mortgage == 1">
      <span>附件：</span>
      <div class="img-view" ng-repeat="img in loanDetail.mortgageContractImage1.split(',')">
        <img ng-src="{{img}}" class="immge">
      </div>
    </div>
  </div>
  <!--分割线-->
  <div class="line"></div>
  <!-- 投保人信息 -->
  <div class="clearfix bgc-white credit-detail font-s">
    <h4 class="font-s font-green">额度信息</h4>
    <div>
      <p>
        <span>授信额度：</span>
        <span ng-bind="loanDetail.credit_limit || '0'"></span>
      </p>
      <p>
        <span>剩余额度：</span>
        <span ng-bind="loanDetail.credit_balance || '0'"></span>
      </p>
    </div>
  </div>
  <!--分割线-->
  <div class="line"></div>
  <!-- 审核 -->
  <div class="clearfix bgc-white credit-detail font-s">
    <h4 class="font-s font-green">审核</h4>
    <div class="credit-detail-verify" ng-if="isAudit == 1">
      <!--当选择了审核通过的时候，展示此项-->
      <p class="input" ng-show="$parent.loanStatus == 2">
        <span>请设置贷款到期日期：</span>
        <input type="text" ng-model="$parent.sdate" min-date="currentDateStr" wdate-picker readonly>
      </p>
      <!--选择审核意见-->
      <p class="input">
        <span>请选择审核意见：</span>
        <select ng-model="$parent.loanStatus">
          <option value="2">审核通过</option>
          <option value="3">审核不通过</option>
        </select>
      </p>
      <!--当选择了审核不通过的时候，展示此项-->
      <p class="input" ng-show="$parent.loanStatus == 2">
        <span>请填写贷款建议额度：</span>
        <input type="text" ng-model="$parent.loanAmount"> 元
      </p>
      <!--当选择了审核不通过的时候，展示此项-->
      <p class="input" ng-show="$parent.loanStatus == 3">
        <span>请填写审核不通过原因：</span>
        <input type="text" ng-model="$parent.loanDesc">
      </p>
      <button class="btn-yellow font-white btn-detail-submit" ng-click="submitLoanResult()">提交</button>
    </div>
    <!--详情-->
    <div class="credit-detail-verify" ng-if="!isAudit">
      <!-- reviewStatus()-->
      <p ng-if="status != 3">贷款到期时间：{{loanDetail.sdate}}</p>
      <p>审核意见：
        <span ng-bind="$status.name(loanDetail.clerk_status, loanDetail.employee_status)"></span>
      </p>
      <p ng-if="status != 3">建议贷款金额：{{loanDetail.employee_limit || loanDetail.clerk_limit}}元</p>
      <p ng-if="status == 3">原因：{{reviewCause()}}</p>
    </div>
  </div>
  <!--分割线-->
  <div class="line"></div>
  <!-- 操作日志 -->
  <div class="clearfix bgc-white credit-detail font-s">
    <h4 class="font-s font-green">操作日志</h4>
    <table class="list-table text-c table table-striped">
      <thead class="bg-green font-white">
      <tr>
        <th>操作时间</th>
        <th>操作人</th>
        <th>贷款状态</th>
        <th>额度</th>
        <th>审核说明</th>
      </tr>
      </thead>
      <tbody>
        <tr ng-repeat="item in records">
          <td ng-bind="item.time"></td>
          <td ng-bind="item.name +' ('+ $status.getRoleName(item.role)+')'"></td>
          <td ng-bind="$status.getStatus(item.role, item.STATUS)"></td>
          <td ng-bind="item.R_LIMIT || '未填写'"></td>
          <td ng-bind="item.R_DESC || '未填写'"></td>
        </tr>
        <tr ng-show="!records || records.length == 0"><td colspan="10">暂无操作日志记录</td></tr>
      </tbody>
    </table>
  </div>
</div>
